Repository navigation
docs: design the ATOMesh RL rollout control plane (#77) - #98
Conversation
…ine's principles Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Round 1 pushed 0a1ce4e.
|
| carries it to D in `kv_transfer_params` | ||
| (`core/placement/backend/atom.rs: AtomAdapter::enrich_decode_kv` adds | ||
| fields and keeps the rest). | ||
| 2. D's `Scheduler._resolve_waiting_remote_kv` compares the stamp after the |
There was a problem hiding this comment.
Rule 2's path does not free blocks or prefill from scratch: _consume_failed_remote_kv is the offload failed_loading path and resumes over the kept table from num_cached_tokens, which covers D's local hit that its refit zeroed. A P/D receive failure aborts today (_abort_failed_remote_receive: decode is not sized for local prefill). Name the mismatch's own path and the conflict with that rule.
| transfer finish as today, then decodes on the received KV only when the | ||
| stamp equals its own version, and otherwise prefills the request itself. A | ||
| refit under PD must name a new `weight_version`, since the stamp is the only | ||
| thing that tells old KV from new. |
There was a problem hiding this comment.
"Must name a new weight_version" has no enforcer, and without it D decodes P's pre-refit KV whenever the two stamps match, which breaks goal 3. Say who refuses it: for example the engine answers 400 to a weight update under a PD connector whose weight_version is absent or equal to its current one.
| participant P as ATOM prefill | ||
| participant D as ATOM decode | ||
| H->>M: 64 concurrent completions (in flight) | ||
| H->>M: fan-out pause_generation {} (no selector filter: P and D) |
There was a problem hiding this comment.
SMG's fan-out answers 400 selector_required without a selector (crates/rl/src/fanout.rs). Say the selector the check passes, e.g. engine=atom, which matches P and D.
|
|
||
| ### D4. A8's selector | ||
|
|
||
| A8 passes `--selector engine=atom`. Settled by the |
There was a problem hiding this comment.
This decision has no rival and restates the Ruling on #77. Cite the Ruling in A8's scenario and drop the decision.
|
|
||
| The scheduler holds the engine's version string: `--weight-version` | ||
| (default `"default"`), replaced when a committed update names one. | ||
| `/generate` `meta_info.weight_version` and `/model_info` report it. |
There was a problem hiding this comment.
The version lives in the EngineCore process, but /model_info and /generate answer from the API server, and with --api-server-count above 1 from a front-end worker. Say how each reads it: a utility command, or the committed update's reply carrying the version to the API side, and which version a request in flight across a refit reports.
|
REQUEST CHANGES @ 0a1ce4e: 2 blocking. Both blocking findings are on the PD in-flight policy, inline: its stamp-mismatch path names Checked: 1 to 10 (detail below); gate passed at the head: black, ruff, 13757 passed and 1477 skipped, mesh cargo tests ok. Accepted with reservation: the launch profile is documented flags rather than a default Watch next: the P stamp must be the version the prefill ran under; the chunked-transfer relay sends D the request before P's stamp exists; D with no stamp takes today's path. Checks
|
…ds weight_version Answers the review of #98 at 0a1ce4e: the PD mismatch path is its own (_recompute_stale_remote_kv), set against the P/D receive abort rule; a P/D engine refuses updates that would leave a stamp ambiguous; /model_info and /generate read the version through a utility command and RequestOutput; A9's fan-outs carry a selector; D4 is dropped for the Ruling it restated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Round 2 pushed 968c6fe.
task-77 @ 968c6fe: gate passed (black, ruff on changed lines, 13757 passed and 1477 skipped, mesh cargo tests ok). |
| | gRPC / ZMQ workers via `rl.control_url`, `RlControlCalls` | HTTP workers only; others answer `no_control_endpoint` | gRPC workers are a non-goal. | | ||
| | `smg_rl_*` metrics | None | No acceptance item reads them. | | ||
|
|
||
| ATOM engine routes against SGLang's (D4): `pause_generation` accepts only |
There was a problem hiding this comment.
This list of engine-route differences from SGLang omits the 400s the PD in-flight policy (rule 5) adds under P/D: an update while not paused, an update naming the version already held, and continue_generation while the version is stale. List them here and point to that policy.
|
APPROVE @ 968c6fe. The five findings from the last round are fixed. One non-blocking finding is inline: the list of engine-route differences from SGLang leaves out the new P/D refusals. Checked: 1 to 10 (detail below); gate passed at the head: black, ruff on changed lines, 13757 passed and 1477 skipped, mesh cargo tests ok. Accepted with reservation: a stale stamp takes a local prefill on D, which departs from the abort rule for failed receives; the design names the conflict and bounds it by the requests in flight at the refit. Watch next: the stale-stamp path must leave D's connector and Checks
|
Closes #77. Ready for review. No blocking issues.
The design every later task under #76 is planned from: ATOMesh's
/v1/rl/*routes on SMG's protocol, the ATOM engine routes behind them, and the PD in-flight policy, with an acceptance table for A1 to A9.Dev record
update_weights_from_distributedin chunks, andWeightUpdaterMixin.update_weightsclears packed FP8 shards after every call; bf16 acceptance models are unaffected. Filed as update_weights drops packed FP8 shards split across calls of one refit #97 (backlog).model_pathfor ATOM workers, so a trainer readingtp_sizefrom/v1/rl/workerswould lay out TP2 ranks wrong; the design adds them from/server_info.weight_version; on a mismatch D frees the table and prefills locally (_recompute_stale_remote_kv), departing from the abort a failed P/D receive takes. A P/D engine refuses an update while unpaused or naming its current version, and refuses resume after a version-less update until a new version arrives./model_inforeads the version through a utility command;/generatereads it fromRequestOutput.weight_version, so both work with--api-server-countabove 1.tcp, not blocked on Mooncake RDMA on g24 leaves D's KV unwritten: 1P1D decodes garbage after the first token #95;/get_weight_versionis not served, as in SMG's examples.Named result
The acceptance table in
docs/atomesh_rl_control_plane.md(Summary, Acceptance): one row per item A1 to A9 with its delivering modules and itspython3 tools/rl/accept.py <check>command.Gates
task-77 @ 968c6fe: gate_task passed (black, ruff on changed lines, 13757 passed and 1477 skipped in the CPU suite, mesh cargo tests). Documentation only; no new tests.
Evidence
Line count at head (
line_count.py fork/RL): code 695 added (design 653, principles 40, index 2), 0 moved, 0 deleted; tests 0. Brief estimate about 500; a design task is exempt from the overrun rule.Design loop log:
/share_nfs/junyan_tmp_r120/rl/scratch/77/atomesh-rl-control-plane.grill.md(scratch).🤖 Generated with Claude Code